package com.qrsx.table;

public class U2In {

	private Integer id;
	private User user;
	private Info info;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Info getInfo() {
		return info;
	}
	public void setInfo(Info info) {
		this.info = info;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((info == null) ? 0 : info.hashCode());
		result = prime * result + ((user == null) ? 0 : user.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		U2In other = (U2In) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (info == null) {
			if (other.info != null)
				return false;
		} else if (!info.equals(other.info))
			return false;
		if (user == null) {
			if (other.user != null)
				return false;
		} else if (!user.equals(other.user))
			return false;
		return true;
	}
	public U2In(User user, Info info) {
		this.user = user;
		this.info = info;
	}
	public U2In() {
	}
	
	
	
	public U2In(Integer id){
		this();
		this.id = id;
	}
	
	
	public U2In(int uid,int infoid){
		this.user = new User();
		this.user.setId(uid);
		this.info = new Info();
		this.info.setId(infoid);
	}
	@Override
	public String toString() {
		return "U2In [id=" + id + ", user=" + user + ", info=" + info + "]";
	}
	
}
